<!DOCTYPE html>
<html>
<head>
<title>财务管理</title>
#include("../include/common.html")
</head>
<body class="gray-bg">
    <div class="wrapper wrapper-content">
        <div class="ibox float-e-margins">
            <div class="ibox-title">
                <h5>财务管理</h5>
            </div>
           	<form id="listForm" action="list" method="get">
           		<input type="hidden" name="type" id="type" value="#(type)">
	            <div class="ibox-content">
	            	<!-- 搜索 start -->
                    <div class="form-horizontal clear">
                        <div class="form-group">
                            <label class="col-sm-1 control-label">手机号：</label>
                            <div class="col-sm-2"><input class="form-control" type="text" name="mobile" value="#(mobile)"></div>
                            <label class="col-sm-1 control-label">昵称：</label>
                            <div class="col-sm-2"><input class="form-control" type="text" name="nickname" value="#(nickname)"></div>
                        </div>
                        <div class="text-center">
                            <input type="submit" class="btn btn-primary btn-w-m" value="查 询">
                            <input type="reset" class="btn btn-primary btn-w-m" value="重 置">
                        </div>
                    </div>
                    <!-- 搜索 end -->
	                <!-- 列表 start -->
	                <div class="form-horizontal clear">
	                    <div class="form-group">
	                        <div class="col-sm-8">
	                            <a href="javascript:;" class="btn btn-primary" id="refreshButton"><i class="fa fa-refresh"></i> 刷新</a>
	                        </div>
	                    </div>
	                    <div class="tabs-container">
		                   <ul class="nav nav-tabs">
		                        <li #if(type=="RECHARGE")class="active"#end><a data-toggle="tab" href="javascript:void(0)" onclick="typeSearch('RECHARGE')">充值</a></li>
		                        <li #if(type=="WITHDRAW")class="active"#end><a data-toggle="tab" href="javascript:void(0)" onclick="typeSearch('WITHDRAW')">提现</a></li>
		                    </ul>
		                    <!-- tab -->
		                    <div class="tab-content">
		                        <div class="tab-pane active">
		                            <div class="panel-body form-horizontal">
					                    <div class="table-responsive">
					                        <table class="table table-bordered" id="listTable">
					                            <thead>
				                                    <tr>
				                                        <th>ID</th>
				                                        <th>会员</th>
				                                        <th>收支</th>
				                                        <th>金额</th>
				                                        <th>类型</th>
				                                        <th>备注</th>
				                                        <th>创建日期</th>
				                                    </tr>
				                                </thead>
				                                <tbody id="listTr">
				                                    #for(payment : page.list)
				                                    <tr>
				                                        <td>#(payment.id)</td>
				                                        <td>
				                                        	ID:#(payment.member.id)<br>
				                                        	昵称:#(payment.member.nickname??"")<br>
				                                        	手机号码:#(payment.member.mobile??"")<br>
				                                        </td>
				                                        <td>#(payment.inout)</td>
				                                        <td>#(payment.amount)</td>
				                                        <td>#(payment.typeName)</td>
				                                        <td>#(payment.memo)</td>
				                                        <td>#(payment.createDate)</td>
				                                    </tr>
				                                    #end
				                                </tbody>
					                        </table>
					                    </div>
				                    </div>
	                            </div>
                            </div>
                        </div>
	                    <div class="text-center">
	                           #pagination(pageNumber = page.pageNumber,totalPages = page.totalPage,pattern = "")
							        #include("../include/pagination.html")
					           #end
	                    </div>
	                </div>
	                <!-- 列表 end -->
	            </div>
            </form>
        </div>
    </div>
</body>
</html>
<script type="text/javascript">
function typeSearch(type){
	$("#type").val(type);
	$("#listForm").submit();
}
</script>